function []=saveadata(adata_dir,ROIs,bv,np,template,dx,dy,aux_files,stim_files,fnames,nbr_frames,mouse_id,date_id,act_map,channelFiles,eye,orientation)

% if ~strcmp(mouse_id(1:3),'GK_')|~strcmp(mouse_id(1:3),'AS_') 
%     disp('mouse ID problem!')
%     return
% end

if ~isdir([adata_dir mouse_id])
    mkdir(adata_dir, mouse_id);
end

if ~isdir([adata_dir mouse_id '\' date_id])
    mkdir([adata_dir mouse_id], date_id );
end
    
save([adata_dir mouse_id '\' date_id '\' mouse_id '-Adata-' fnames{1}(4:7)],'ROIs','bv','np','template','dx','dy','aux_files','stim_files','fnames','mouse_id','nbr_frames','date_id','act_map','channelFiles','orientation','eye');
disp('Saved Adata');